#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<algorithm>
#include<vector>
#include<utility>
using namespace std;

int main() {
	vector<pair<int, int>> vec;
	vec.push_back(make_pair(3, 2));
	vec.push_back(make_pair(1, 4));
	vec.push_back(make_pair(2, 1));
	
	sort(vec.begin(), vec.end());

	for (const auto& p : vec) cout << p.first << ", " << p.second << endl;
	return 0;
}